//撤离点标记

if (!isServer) exitWith {};

private ["_markerNo", "_markerName"];

_markerNo = _this select 0;
_markerName = "drn_Escape_ExtractionPos" + str _markerNo;
_markerName2 = "drn_Escape_ExtractionPos" + str _markerNo + "_1";
//private _pos = getMarkerPos _markerName;

private _location = "Land_HelipadEmpty_F" createvehicle (getMarkerPos _markerName);
private _location2 = "Land_HelipadEmpty_F" createvehicle (getMarkerPos _markerName2);
_location3 = "Land_TacticalBacon_F" createvehicle (a3e_var_Escape_ExtractionMarkerPos);

//_location setvariable ["A3E_ExtractionOnStandby",true];

_isWater = surfaceIsWater (getMarkerPos _markerName);

//private _code = compile format["[%1,%2,_this] call A3E_fnc_firedNearExtraction;",_markerNo,_isWater];
//_location3 addEventHandler ["firedNear",_code];//本地添加的单位到附近才有效

[[_location3,_markerNo,_isWater], {_unit = _this select 0; ES_markerNo = _this select 1; ES_isWater = _this select 2; _unit addEventHandler ["firedNear", {[ES_markerNo,ES_isWater,_this] remoteExec ["A3E_fnc_firedNearExtraction", 2]}]}] remoteExec ["BIS_fnc_call", 0, true];////

diag_log format["fn_CreateExtractionPoint: eventhandler added at %1",(getpos _location)];
